﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using Autofac;
using Koonfusion.SyncDeploy.Core;
using Koonfusion.SyncDeploy.Core.Services;

namespace SyncDeploy.Test
{
    class Program
    {
        static void Main(string[] args)
        {
            var serverDir = new DirectoryInfo(@"D:\OpenSource\syncdeploy\SyncServer");
            if (serverDir.Exists)
            {
                serverDir.Delete(true);
            }
            serverDir.Create();

            new ManifestBuilder().CreatePackage(new DirectoryInfo(@"D:\OpenSource\syncdeploy\Source\"), serverDir, "TestPackage");

            var destDir = new DirectoryInfo(@"D:\OpenSource\syncdeploy\Target\\\\");
            new ManifestExtractor().ExtractPackage(new Uri(@"http://localhost/sync/"), destDir);

            Console.ReadLine();
        }
    }
}
